This invention relates to data processing systems (apparatus), methods and computer program products, and more particularly to data processing systems, methods and computer program products that use the 3270 datastream architecture.
Data processing systems, methods and computer program products that use the 3270 datastream architecture have been widely used for decades. The 3270 datastream architecture has been so widely used, that systems using the 3270 datastream architecture are often referred to as xe2x80x9clegacyxe2x80x9d systems.
The 3270 datastream architecture is used to communicate between a primary logical unit (LU) and a secondary logical unit using LU2 protocol. It will be understood that the primary and secondary logical units may be mainframe computers, midrange computers, personal computers, terminals, workstations or one or more computer programs that execute on one or more of the above. The 3270 datastream architecture is described in many publications, including but not limited to the xe2x80x9cIBM 3270 Information Display System Datastream Programmer""s Referencexe2x80x9d, published by International Business Machines Corporation (IBM), the assignee of the present application, IBM Publication Number GA23-0059-07, 1992, the disclosure of which is hereby incorporated herein by reference.
As shown in FIG. 1, a data processing system 100 includes a primary logical unit 110 and a secondary logical unit 120 that communicate with each other over a network 130 using the 3270 datastream. The primary logical unit 110 may also be referred to as a host or server, and the secondary logical unit 120 may be referred to as a terminal, workstation, emulator or client. It will be understood that, although FIG. 1 illustrates a simple data processing system 100 including one primary logical unit, one secondary logical unit 120 and a simple network connection 130, the 3270 datastream architecture is generally used to communicate among many primary logical units and secondary logical units using complex network environments. An example of a more typical data processing system using 3270 datastream architecture may be found in U.S. Pat. 5,649,101, entitled xe2x80x9cSystem and Method for Improving 3270 Data Stream Performance by Reducing Transmission Trafficxe2x80x9d to Mathewson II, assigned to the assignee of the present invention, the disclosure of which is hereby incorporated herein by reference.
The 3270 datastream architecture was designed before graphical user interfaces (GUI) became commonplace. Because of the ease of use that a graphical user interface may provide, it is desirable to provide graphical user interfaces for 3270 datastream architecture systems. However, due to the legacy nature of 3270 datastream architecture systems, it is generally desirable to provide graphical user interfaces without requiring rewriting of legacy code or rearchitecting of legacy systems.
One widely used programming language that can provide a rich graphical user interface is Java. As is well known to those having skill in the art, Java programs, in compiled form, are generally portable and will generally run on a wide range of computers and operating systems. Stated differently, Java provides a machine-dependent desktop for executing machine independent applications and applets. Java programs support referencing Universal Resource Locator (URL) identifiers with content types of, for example, audio/basic, audio/x-WAV image/GIF and image/JPEG.
Accordingly, it would be desirable to integrate Java with legacy 3270 applications to obtain the advantages of Java as a portable programming language and the potential cost-savings of Java""s centralized application distribution paradigm. However, it would be desirable to integrate Java with legacy 3270 applications without the need to write new legacy applications or to modify existing legacy applications.
Many techniques exist for integrating Java with legacy 3270 applications. These techniques include screen-scraping, an HTML gateway, an object request broker and loading Java classes over LU2 and LU6.2. However, each of these techniques may have shortcomings as described below.
Screen-scraping is a technique of interacting programmatically with the 3270 datastream at the client, in order to combine host data from one or more sources with new program logic and a graphical user interface. The client application gains access to the 3270 data through an application programming interface on a terminal emulator. This program can read the screen contents, issue keystrokes and perform all the other actions that a user could perform. Unfortunately, although it may offer a cosmetic improvement compared to a standard 3270 screen, the screen-scraping application may be vulnerable to a positional change in the host data, such as a date change that shifts data to a new screen offset. Moreover, screen-scraping may also require distributing the application, and subsequent updates to it, to all clients. This problem may be partly overcome by writing the screen-scraper application in Java, if a TCP/IP network over which the Java application could be distributed is available, but this may not automatically confer all of Java""s benefits. The client application may still need to be distributed to all the client workstations, or may need to be stored on a separate web server, if having a parallel infrastructure is acceptable. In a large enterprise, however, it may take years to make such a sweeping network change, with all the accompanying administrative hardware and software changes.
A hypertext mark-up language (HTML) gateway is a more general extension of screen-scraping. An HTML gateway is a separate program between a host application and a 3270 emulator. The HTML gateway can convert the entire 3270 datastream to HTML. The client then becomes a browser. An HTML gateway may reproduce the visual appearance of a 3270 screen, or it may interpret the data and convert it into a new graphical user interface representation. It is even possible to read-in the 3270 screen maps residing on the host that are used to format data extracted from a database for 3270 presentation, interpret them and use this augmented information to generate a more tailored HTML screen. Existing products, such as VisualAge for Small Talk Version 3.0 interact with these Basic Mapping Support (BMS) or Message Format Service (MFS) maps.
Unfortunately, HTML gateways may have drawbacks because host applications generally cannot handle unexpected navigational sequences. Thus, if a user presses the browser""s Back button to display a previous screen, and then presses a key, causing input to the host application, the application state may not match the data. This could cause a program crash or an undetected logic error that puts incorrect data into a database. Moreover, if the secondary logical unit is at an intermediate gateway rather than at the client, it may be difficult to diagnose faults that occur between the gateway and the client, or to correlate faults at the gateway with the session between the host and the gateway.
Object Request Brokers may be used to replace 3270 datastream communications with object-oriented remote procedure calls. Thus, access to legacy data and legacy applications may be provided by wrapping them in an object wrapper. An Object Request Broker is an example of an object wrapper. Unfortunately, this approach may require monolithic new software development. It may not lend itself to incremental replacement of legacy applications. However, with the large amount of legacy application code that is present, it may not be feasible to replace these applications monolithically. Moreover, remote method invocations and remote procedure calls may not be optimized for the delays and limited bandwidth that are typical of a wide area network, so that performance may be unsatisfactory or degraded.
Finally, Java classes may be loaded by a modified Java class loader that uses LU2 and LU6.2 sessions as its transport. By typing a command on a host command line, a user can invoke the Systems Network Architecture (SNA) for Java class loader. However, this may not integrate Java with the 3270 datastream.
The above survey indicates that although it is generally desirable to integrate Java with legacy 3270 applications, there may be shortcomings with conventional techniques for doing so. Accordingly, there continues to be a need for systems, methods and computer program products for passing Java bytecodes between a primary logical unit and a secondary logical unit that communicate with each other over a network using 3270 datastream architecture.
It is therefore an object of the present invention to provide improved systems, methods and computer program products for integrating Java into 3270 datastreams.
It is another object of the present invention to integrate Java with legacy 3270 applications without requiring rewriting of legacy applications.
It is yet another object of the present invention to allow incremental integration of Java into legacy 3270 applications.
These and other objects are provided, according to the present invention, by embedding Java bytecodes in a 3270 datastream structured field and passing the 3270 datastream structured field, including the Java bytecodes so embedded, between a primary logical unit and a secondary logical unit that communicate with each other over a network using 3270 datastream architecture. The 3270 datastream structured fields are well known elements of the 3270 datastream architecture that are used to send and receive additional control functions and data. Accordingly, Java applets may be placed on the same computer (the host or primary logical unit), where the legacy applications reside. The benefit of Java""s centralized application administration and automatic software distribution may thereby be provided to the host. Moreover, Java bytecodes are transported to the client through the same conduit that transports the 3270 legacy data. Thus, new infrastructure need not be developed, and existing management projects, procedures and tools may be used. Java bytecodes including Java applets, images and/or audio may thereby be integrated with legacy applications, both temporally and spatially. Incremental replacement of legacy applications with new graphical user interface-based Java applications may be provided.
For example, an insurance adjuster application may be enhanced by presenting photographs along with insurance claims data. An employee directory can include an employee""s photograph next to the entry. A travel expense reimbursement form can include a graphical user interface calculator or a hot link to the company""s travel policy that is stored on a different server. Thus, a new Java applet can be used to annotate an existing legacy application, without the need to change the legacy application itself. It can be used to add more user-friendly help information and/or reduce training costs. Individual panels may be updated to a graphical user interface form incrementally.
Prior to passing the 3270 datastream structured field including Java bytecodes so embedded between the primary logical unit and secondary logical unit, it should be insured that the secondary logical unit supports Java. An initialization protocol according to the present invention sends a Read Partition (Query) structured field from the primary logical unit to the secondary logical unit, to query whether the secondary logical unit supports Java. The secondary logical unit sends a Query Reply structured field to the primary logical unit in response to receipt of the Read Partition (Query) from the primary logical unit if the secondary logical unit supports Java. In response to receipt of the Query Reply structured field from the secondary logical unit, the 3270 datastream structured field including embedded Java bytecodes is passed between the primary logical unit and the secondary logical unit.
Conventional uses of Java applets generally rely on an HTML page to begin. Conventionally, a browser parses the HTML. When the browser encounters an applet tag, the browser requests the applet from the web server, which is generally the same computer from which it received the HTML page. However, according to the present invention, Java applets are activated in a manner which is contrary to convention. More specifically, the 3270 datastream structured field including embedded Java bytecodes is pushed from the primary logical unit to the secondary logical unit under control of the primary logical unit, without receiving a request for the Java bytecodes from the secondary logical unit. Accordingly, HTML pages and/or a web server are not required, and the host application may send the first applet to the secondary logical unit in an unsolicited manner.
The Java bytecodes that are embedded in a 3270 datastream structured field according to the invention may include but are not limited to, Java applets, images and audio. In order to identify the type of object that is embedded, a corresponding Java applet identifier, an image identifier and an audio identifier are provided in the 3270 datastream structured field. By identifying the type of object, the structured field type indirectly indicates the type of viewer that can process the object.
As is known to one skilled in the art, Java applets, images and audio data are often longer than the outbound data length for which 3270 datastream architecture was originally designed and optimized. More specifically, a 3270 structured field can include 32 kilobytes of data. In contrast, images may range from approximately 100 bytes to several megabytes. Audio files may also be quite large, for example from 50 kilobytes to over 1 megabyte. According to the invention, a 3270 datastream technique called xe2x80x9cspanningxe2x80x9d is used to enlarge amounts of Java bytecodes in 3270 datastream structured fields. More specifically, Java bytecodes of a size that exceeds a structured field length limit are embedded into a plurality of 3270 datastream structured fields. The plurality of 3270 datastream structured fields are spanned between the primary logical unit and the secondary logical unit.
Moreover, the spanned 3270 datastream structured fields may be cached in the secondary logical unit, to thereby reduce latency. More specifically, in a conventional 3270 application, there are often long pauses between data inputs by the user. Spanned chunks of 3270 datastream structured fields with embedded Java bytecodes may be interleaved with the other transmissions in the session, such as character-formatted data sent by the legacy application. The structured fields of image and audio may include a xe2x80x9cDisplay or Play Nowxe2x80x9d indicator that can be turned on or off. Thus, an application can start sending audio or image data in advance of it being needed. The data is then cached in the secondary logical unit, so that the object can arrive at the secondary unit without a perceptible pause. When the audio is to play or the image is to display, another structured field may be sent referencing the previously sent object by name with a xe2x80x9cDisplay or Play Nowxe2x80x9d indicator turned on.
To reduce the quantity of data being sent between a host and a client, the present invention also includes an xe2x80x9cinvoke by referencexe2x80x9d syntax by which the host instructs the client to invoke a named, typed object without actually sending the object. If the client already has the object cached from a previous use, the client can invoke the object immediately or later according to the state of the xe2x80x9cDisplay Nowxe2x80x9d indicator. Otherwise, the client requests the missing object from the host, which supplies it by sending the object in 3270 datastream structured fields. Once the client receives and caches the object, or retrieves it from a cache, the client invokes the object similar to where the host had sent the object itself.
The present invention can also be used with objects other than Java bytecodes. Thus, for example, image, audio and other objects may be integrated with legacy 3270 applications by embedding the object in a 3270 datastream structured field, and passing the 3270 datastream structured field, including the object so embedded, between a primary logical unit and a secondary logical unit that communicates with each other over a network using 3270 datastream architecture.
Accordingly, Java and other arbitrary objects may be integrated with legacy 3270 applications, without requiring the rewriting of legacy applications and allowing the use of highly developed 3270 datastream architecture. Initialization protocols, bootstrapping mechanisms to start a first Java applet, caching, spanning and extending the protocols to arbitrary object types are also provided. It will be understood by those having skill in the art that the present invention may be embodied as methods, apparatus (systems) and/or computer program products.